<!DOCTYPE html>
<html>
<head>
    <style>
        body {
            background: #000;
            overflow: hidden;
            margin: 0;
        }
        .heart {
            position: absolute;
            animation: beat 1s infinite;
        }
        @keyframes beat {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.2); }
        }
        .text {
            position: absolute;
            color: #ff4081;
            font-family: 'Microsoft Yahei';
            text-shadow: 0 0 10px #fff;
            white-space: nowrap;
        }
    </style>
</head>
<body>
    <script>
        function createHeart(x, y) {
            const heart = document.createElement('div');
            heart.innerHTML = '❤️';
            heart.className = 'heart';
            heart.style.left = x + 'px';
            heart.style.top = y + 'px';
            heart.style.fontSize = Math.random()*30 + 20 + 'px';
            document.body.appendChild(heart);
            
            setTimeout(() => heart.remove(), 1000);
        }

        function createText(text) {
            const elem = document.createElement('div');
            elem.className = 'text';
            elem.style.left = Math.random()*window.innerWidth + 'px';
            elem.style.top = Math.random()*window.innerHeight + 'px';
            elem.style.fontSize = Math.random()*20 + 15 + 'px';
            elem.textContent = text;
            document.body.appendChild(elem);
            
            setTimeout(() => elem.remove(), 2000);
        }

        // 浪漫语句集合
        const messages = [
            "你是我宇宙的终极浪漫",
            "朝暮与年岁并往，与你一起共至光年",
            "三生有幸遇见你",
            "余生请多指教",
            "爱你如初，万古长存"
        ];

        // 创建交互效果
        document.addEventListener('click', (e) => {
            createHeart(e.clientX, e.clientY);
            createText(messages[Math.floor(Math.random()*messages.length)]);
        });

        // 自动生成爱心雨
        setInterval(() => {
            createHeart(
                Math.random()*window.innerWidth,
                Math.random()*window.innerHeight
            );
        }, 300);
    </script>
</body>
</html>